class HinhVuong
  def initialize
    puts "[Tinh dien tich hoac chu vi hinh vuong ban can nhap chieu dai 1 canh]"
    puts "Chieu dai canh a:"
  end
  def Dientich (a)
    puts "Dien tich hinh vuong: [canh]*[canh]:"
    return a*a
  end
  def Chuvi (a)
    puts "Chu vi hinh vuong: [canh]*[4]:"
    return a*4
  end
end
class Hinhtron
  def initialize
    puts "[Tinh dien tich hoac chu vi hinh tron ban can nhap ban kinh]"
    puts "Ban kinh R:"
  end
  def Dientich (a)
    puts "Dien tich hinh tron: [R]*[R]*[pi]:"
    return a*a*3.14
  end
  def Chuvi (a)
    puts "Chu vi hinh tron: [2]*[pi]*[R]:"
    return 2*3.14*a
  end
end
class HinhChuNhat
  def initialize
    puts "[Tinh dien tich hoac chu vi hinh chu nhat ban can nhap chieu dai va chieu rong]"
    puts "Chieu dai & chieu rong:"
  end
  def Dientich (a,b)
    puts "Dien tich hinh chu nhat: [dai]*[rong]:"
    return a*b
  end
  def Chuvi (a,b)
    puts "Chu vi hinh chu nhat: [dai+rong]*[2]:"
    return  (a+b)*2
  end
end


